package Model;

import java.util.ArrayList;

import FileParser.FileParser;

public class TestProgram {
/**
     * @param args
     */
    public static void main(String[] args) {
    	
      insertManuscript();
    	//deleteManuscript();
    }
    public static void insertManuscript(){
    	
    	 FileParser fp = new FileParser();
         Conference conference = new Conference("100", "12/25/2012", "UW Tacoma","12/01/2012" );
         Author bill = new Author(fp, "Bill Starr", conference);
         Manuscript manuscript = 
                 new Manuscript(bill.getName(), "Junk and Stuff", "link and things", conference);
         ArrayList<Manuscript> list =  new ArrayList<Manuscript>();
         list.add(manuscript);
         
         
         fp.insertManuscript(conference.getName(), list);

    	   /*String conference="100";
    	   ArrayList<Manuscript> manuscriptList = new ArrayList<Manuscript>();
	       ArrayList<Review> reviewList1 = new  ArrayList<Review>();
		   Review review1 = new Review("Tony","/Papers/AnotherPaper.docx");	
		   Review review2 = new Review("JOS","/myfile.docx");
		   reviewList1.add(review1);    		   
		   reviewList1.add(review2);
		   ArrayList<Review> reviewList2 = new  ArrayList<Review>();
		   Review review3 = new Review("Tony","/Papers/AnotherPaper.docx");	
		   Review review4 = new Review("JOS","/myfile.docx");
		   reviewList2.add(review3);    		   
		   reviewList2.add(review4);

		   Manuscript manuscript1 = new Manuscript("Clint Eastwood New", "Please work New", "/Papers/Hello.docx", "Sir Charles", "Honey Booboo Child", 1, 0, null, reviewList1);
		   Manuscript manuscript2 = new Manuscript("Tom New", "Good New", "/Good.docx", "Sir Charles", "Kim", 0, -1, null, reviewList2);
		   manuscriptList.add(manuscript1);
		   manuscriptList.add(manuscript2);

		   FileParser aFileParse = new FileParser();
		   aFileParse.insertManuscript(conference, manuscriptList);*/
    }
    
    public static void deleteManuscript(){
    	
 	   String role=Roles.AUTHOR.toString();
 	   ArrayList<Manuscript> manuscriptList = new ArrayList<Manuscript>();
	       Manuscript manuscript1 = new Manuscript(null, "Please work", null, "Sir Charles", null, 1, 0, null, null);
		 //  Manuscript manuscript2 = new Manuscript(null, "I think its working", null, "Sir Charles", null, 0, -1, null, null);
		   manuscriptList.add(manuscript1);
		   // manuscriptList.add(manuscript2);

		   FileParser aFileParse = new FileParser();
		   aFileParse.deleteManuscript(role,"100", manuscriptList);
 }
}